package com.ttwl.www.app.meFrame.myCollectFrame;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.ttwl.www.app.R;

/**
 * Created by Administrator on 2017/10/27 0027.
 */

public class LinearAdapterCollect extends RecyclerView.Adapter<LinearAdapterCollect.LinearViewHolder> {
    private Context mContext;
    public LinearAdapterCollect(Context context) {
        this.mContext = context;
    }
    @Override
    public LinearAdapterCollect.LinearViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new LinearViewHolder(LayoutInflater.from(mContext).inflate(R.layout.layout_linear_itemcollect,parent,false));
    }

    @Override
    public void onBindViewHolder(LinearAdapterCollect.LinearViewHolder holder, int position) {
//        holder.tvTitle.setText("我是标题");
    }

    @Override
    public int getItemCount() {
        return 5;
    }

    class LinearViewHolder extends RecyclerView.ViewHolder{
        private TextView tvTitle;
        public LinearViewHolder(View itemView) {
            super(itemView);
            tvTitle = (TextView) itemView.findViewById(R.id.tv_title);
        }
    }
}
